import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/user/HomeView.vue'
import tata from '../views/tata.vue'
import Login from '../views/user/Login.vue'
import Login1 from '../views/user/Login1.vue'
import PhoneVerify from '../views/user/PhoneVerify.vue'
import yindao from '../views/user/yindao.vue'
import Home1 from '../views/Home1.vue'
import Discover from '../views/Discover.vue'
import Search from '../views/Search.vue'
import Square from '../views/Square.vue'
import zhifu from '../views/user/zhifu.vue'
import taobao from '../views/user/taobao.vue'
import weixin from '../views/user/weixin.vue'
import qq from '../views/user/qq.vue'
import UserCenter from '../views/UserCenter.vue';
import Settings from '../views/my/Settings.vue';
import AccountSafety from '../views/my/AccountSafety.vue';
import RealNameAuth from '../views/my/RealNameAuth.vue';
import geren from '../views/my/geren.vue';
import shou from '../views/my/shou.vue';
import xiaoxi from '../views/my/xiaoxi.vue';
import shouye from '../views/home/shouye.vue';
import yanzhng from '../views/my/yanzhng.vue';
import GuangChang from '../views/home/GuangChang.vue';//广场


import PostDetail from '../views/home/PostDetail.vue';
import ShangDian from '../views/shangdian/ShangDian.vue';

import JiaHao from '../views/home/JiaHao.vue';

// 商店
import CategoryPage from '../views/shangdian/CategoryPage.vue';
import ProductDetail from '../views/shangdian/ProductDetail.vue'; // 引入商品详情页组件
import DiscountPage from '../views/shangdian/DiscountPage.vue';
import NewUserPage from '../views/shangdian/NewUserPage.vue';
import OrderSettlement from '../views/shangdian/OrderSettlement.vue';
import PayOrder from '../views/shangdian/PayOrder.vue';
import PaymentResult from '../views/shangdian/PaymentResult.vue';
//这是搜索页面
import BeautyPage from '../views/home/BeautyPage.vue';
const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/PhoneVerify',
      name: 'PhoneVerify',
      component: PhoneVerify,
    },
    { path: '/UserCenter', component: UserCenter },
    { path: '/settings', component: Settings },
    { path: '/account-safety', component: AccountSafety },
    { path: '/real-name-auth', component: RealNameAuth },
    { path: '/shouye', component: shouye },
    { path: '/ShangDian', component: ShangDian },
    { path: '/JiaHao', component: JiaHao },
    //商店
    { path: '/OrderSettlement', component: OrderSettlement },
    { path: '/PayOrder', component: PayOrder },
    { path: '/PaymentResult', component: PaymentResult },
    // 搜索
    { path: '/BeautyPage', component: BeautyPage },

    {
      path: '/post-detail',
      name: 'PostDetail',
      component: PostDetail
    },
    {
      path: '/zhifu',
      name: 'zhifu',
      component: zhifu,
    },
    {
      path: '/GuangChang',
      name: 'GuangChang',
      component: GuangChang,
    },
    {
      path: '/new-user',
      name: 'NewUser',
      component: NewUserPage
    },
    {
      path: '/category/:categoryId',// 商店分类
      name: 'Category',
      component: CategoryPage
    },
    {
      path: '/product/:productId',// 商店商品详情
      name: 'ProductDetail',
      component: ProductDetail
    },
    {
      path: '/discount',
      name: 'Discount',
      component: DiscountPage
    },
    {
      path: '/yanzhng',
      name: 'yanzhng',
      component: yanzhng,
    },
    {
      path: '/xiaoxi',
      name: 'xiaoxi',
      component: xiaoxi,
    },
    {
      path: '/shou',
      name: 'shou',
      component: shou,
    },
    {
      path: '/geren',
      name: 'geren',
      component: geren,
    },
    {
      path: '/qq',
      name: 'qq',
      component: qq,
    },
    {
      path: '/weixin',
      name: 'weixin',
      component: weixin,
    },
    {
      path: '/taobao',
      name: 'taobao',
      component: taobao,
    },
    {
      path: '/home',
      name: 'home',
      component: HomeView,
    },
    {
      path: '/Home1',
      name: 'Home1',
      component: Home1,
    },
    {
      path: '/Discover',
      name: 'Discover',
      component: Discover,
    },
    {
      path: '/Search',
      name: 'Search',
      component: Search,
    },
    {
      path: '/Square',
      name: 'Square',
      component: Square,
    },
    {
      path: '/Login',
      name: 'Login',
      component: Login,
    },
    {
      path: '/',
      name: 'yindao',
      component: yindao,
    },
    {
      path: '/Login1',
      name: 'Login1',
      component: Login1,
    },
    {
      path: '/tata',
      name: 'tata',
      component: tata,
    },
    {
      path: '/about',
      name: 'about',
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('../views/AboutView.vue'),
    },
  
  ],
})
export default router
